package com.cc.utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.cc.dao.UserStudentMapper;
import com.cc.entity.UserStudent;

public class AutherUtils {
//	/**
//	 * 获取登录用户对象（学生用户）
//	 * @param session
//	 * @return
//	 */
//	public static UserStudent getCurrentUser(HttpSession session){
//		UserStudentMapper userStudentDao=SpringContextHolder.getBean("UserStudentMapper");
//		UserStudent token=(UserStudent)session.getAttribute("token");
//		return userStudentDao.selectUserStudentByUsername(token);
//	}
	/**
	 * 获取项目路径
	 * @param request
	 * @return
	 */
	public static String getAppContext(HttpServletRequest request){
		String ctx=request.getContextPath();
		return ctx;
	}

}
